home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY3 / POV301 / povray3 / povscn / level1 / pov / ballbox1 next >
Text File  |  1995-11-08  |  2KB  |  82 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // File by Dan Farmer
  3. // Demonstrates glass textures, CGS with box primitives, one of Mike Miller's
  4. // fabulous marble textures, modified with an "octaves" change, and doesn't
  5. // make a half-bad image, either.  Interesting lighting effect, too.
  6.  
  7. #version 3.0
  8. global_settings { assumed_gamma 2.2 }
  9.  
  10. #include "colors.inc"
  11. #include "shapes.inc"
  12. #include "textures.inc"
  13. #include "glass.inc"
  14. #include "stones.inc"
  15.  
  16. camera {
  17.    location  <0.75, 3.5, -3.5>
  18.    direction <0.0,  0.0,  0.5>       //  "wide-angle" view
  19.    up        <0.0,  1.0,  0>
  20.    right     <4/3,  0.0,  0>
  21.    look_at   <0,    0,   -1>}
  22.  
  23. // Light sources, two to the front, right, on from the left, rear.
  24. light_source {<-30, 11,  20> color White}
  25. light_source {< 31, 12, -20> color White}
  26. light_source {< 32, 11, -20> color LightGray}
  27.  
  28. union {
  29.    // A green glass ball inside of a box-shaped frame
  30.    sphere { <0, 0, 0>, 1.75
  31.       texture {
  32.          T_Glass1
  33.          pigment {color green 0.90 filter 0.85}
  34.          finish {
  35.             caustics 1.0
  36.             phong 1 phong_size 300         // Very tight highlights
  37.             reflection 0.15                // Needs a little reflection added
  38.          }
  39.       }
  40.    }
  41.  
  42.    // A box-shaped frame surrounding a green glass ball
  43.    difference {
  44.       object {UnitBox scale 1.5}     // The outside dimensions
  45.  
  46.       // And some square "holes" in all sides.  Note that each of
  47.       // these boxes that are going to be subtracted has one vector
  48.       // scaled just slightly larger than the outside box.  The other
  49.       // two vectors determine the size of the hole.
  50.       // Clip some sqr holes in the box to make a 3D box frame
  51.       object{UnitBox scale <1.51, 1.25, 1.25> }   // "clip" x
  52.       object{UnitBox scale <1.25, 1.51, 1.25> }   // "clip" y
  53.       object{UnitBox scale <1.25, 1.25, 1.51> }   // "clip" z
  54.  
  55.       pigment { red 0.75 green 0.75 blue 0.85 }
  56.       finish {
  57.          ambient 0.2
  58.          diffuse 0.7
  59.          reflection 0.15
  60.          brilliance 8
  61.          specular 1
  62.          roughness 0.01
  63.       }
  64.  
  65.       // Same as radius of glass sphere, not the box!
  66.       bounded_by {object {UnitBox scale 1.75}}
  67.    }
  68.    rotate y*45
  69. }
  70.  
  71. plane { y, -1.5
  72.    texture {
  73.       T_Stone1
  74.       pigment {
  75.          octaves 3
  76.          rotate 90*z
  77.       }
  78.       finish { reflection 0.10 }
  79.    }
  80. }
  81. // end of file
  82.